/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package system;

import ejb.system.Utente;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;

/**
 *
 * @author ciummo
 */
public class UserActionForm extends org.apache.struts.action.ActionForm {
    
    private final String adminDialog = "Admin Dialog";
    private final String userDialog = "Tecnico Dialog";
    private final String adminSapio = "Admin Sapio";
    private final String userSapio = "Tecnico Sapio";
    
    private String username;
    private String password;
    private String codFiscale;
    private String ruolo;
    private String nome;
    private String cognome;
    private String telefono;
    private String email;
    private int stato;
    
    
    private ArrayList articleList = new ArrayList();

    
    
    
    private List <Utente> list;
    
    
    private String role;
    private ArrayList roleList = new ArrayList();
    
    public List<Utente> getList() {
        return list;
    }

    public void setList(List<Utente> list) {
        this.list = list;
    }

    public Utente getElement(int n) {
        return (Utente)list.get(n);
    }        
    
    
    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    
    
    public String getCodFiscale() {
        return codFiscale;
    }

    public void setCodFiscale(String codFiscale) {
        this.codFiscale = codFiscale;
    }

    public String getCognome() {
        return cognome;
    }

    public void setCognome(String cognome) {
        this.cognome = cognome;
    }

    public String getNome() {
        return nome;
    }

    public void setNome(String nome) {
        this.nome = nome;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getRuolo() {
        return ruolo;
    }

    public void setRuolo(String ruolo) {
        this.ruolo = ruolo;
    }

    public String getTelefono() {
        return telefono;
    }

    public void setTelefono(String telefono) {
        this.telefono = telefono;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    public ArrayList getRoleList() {
        return roleList;
    }

    public void setRoleList(ArrayList roleList) {
        this.roleList = roleList;
    }



    public int getStato() {
        return stato;
    }

    public void setStato(int stato) {
        this.stato = stato;
    }

    
    


    /**
     *
     */
    public UserActionForm() {
        super();
        
        roleList.add(new ListType(1,adminDialog));
        roleList.add(new ListType(2,userDialog));
        roleList.add(new ListType(3,adminSapio));
        roleList.add(new ListType(4,userSapio));
        
        
        
    }


    public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
        ActionErrors errors = new ActionErrors();

        return errors;
    }
}
